<?php

class Mlogin extends CI_Model {

	function login($param)
	 {
		$this->db->where('adminname', $param['username']);
		$this->db->where('psw', $param['password']);
		$query = $this->db->get('admins');
		if($query->num_rows == 1)
		{
			return true;
		}
	 }
	 
	 // public $table = 'ADMINS';
	 // public $primary_key = 'ADMINNAME';
	 
	 // function __construct()
	 // {
		// parent::__construct();
	 // }
	 
	 // function get_login_info($username)
	 // {
		// $this->db->where('ADMINNAME',$username);
		// $this->db->limit(1);
		// $query = $this->db->get($this->table);
		// return ($query->num_rows() > 0 )? $query->row() :FALSE;
	 // }
	 
}